Xbasic

BITMAP_WIDTH Function

Syntax

Width as N = BITMAP_WIDTH(C bitmap_name)

Arguments

bitmap_nameCharacter

The bitmap to measure.

Returns

WidthNumeric

Returns the width of the bitmap in inches.

Description

BITMAP_WIDTH() returns the width of the bitmap in inches.

Example

The following example displays the text "Sample" centered vertically and horizontally on the bitmap.

images/GR_text_height.gif
ui_bitmap_create("test", 4, 1)
ui_bitmap_draw("test",<<%code%
set_font("Verdana,20,biu", "blue", "white")
inner_Rect(0, 0, 4, 1)
text("Sample", bitmap_width("test")/2, bitmap_height("test")/2, "center")
%code%)
ui_dlg_box("","{image=test}")

Limitations

Used only in the Code sections of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().

See Also